package com.yb.java8.growing.jdk7;

import com.yb.java8.growing.jdk5.EnumDemo;

/**
 * switch对String的支持
 */
public class SwitchString {
    public static void main(String[] args) {
        String bis = "java";
        switch (bis) {
            case "java":
                System.out.println(bis);
                break;
            case "python":
                break;
            case "ruby":
                break;
            default:
                break;
        }
        EnumDemo enumDemo = EnumDemo.GREEN;
        switch (enumDemo) {
            case RED:
                System.out.println(enumDemo.name());
                break;
            case YELLOW:
                break;
            default:
                break;
        }
    }
}
